package com.veo.dao;

import com.baomidou.mybatisplus.core.mapper.Mapper;
import com.veo.bean.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleDao extends Mapper<Role> {

    @Select("SELECT r.id, r.role_name roleName, r.role_desc roleDesc \n" +
            "FROM sys_role r, sys_user_role ur \n" +
            "WHERE r.id=ur.rid AND ur.uid=#{uid}")
    List<Role> findByUid(Integer uid);
}
